package com.kafkacode.consumer;

import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

@Component
public class EventConsumer {
    //监听消息
    @KafkaListener(topics = {"topic-01"},groupId = "group1")
    public void onEvent(String event){
        System.out.println("event = " + event);
    }

}
